conchuela doesn't like gnu_printf anymore

  • Jump to comment-1
    tgl@sss.pgh.pa.us2022-08-06T16:59:24+00:00
    Buildfarm animal conchuela recently started spitting a lot of warnings like this one: conchuela | 2022-08-06 12:35:46 | /home/pgbf/buildroot/HEAD/pgsql.build/../pgsql/src/include/port.h:208:70: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes] I first thought we'd broken something, but upon digging through the buildfarm history, the oldest build showing these warnings is https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=conchuela&dt=2022-07-18%2020%3A20%3A18 The new commits in that build don't look related, but what does look related is that the choice of C++ compiler changed: configure: using compiler=gcc 8.3 [DragonFly] Release/2019-02-22 configure: using CXX=ccache clang++14 vs configure: using compiler=gcc 8.3 [DragonFly] Release/2019-02-22 configure: using CXX=g++ This is seemingly an intentional configuration change, because the animal is reporting different config_env than before. However, we decide what to set PG_PRINTF_ATTRIBUTE to based on what CC likes, and if CXX doesn't like it then you'll get these warnings. (The warnings only appear in C++ compiles, else there'd REALLY be a lot of them.) Is it worth the trouble to try to set PG_PRINTF_ATTRIBUTE differently in C and C++ builds? I doubt it. Probably the right fix for this is to use matched C and C++ compilers, either both clang or both gcc. I fear that inconsistency could lead to bigger problems than some warnings. regards, tom lane
    • Jump to comment-1
      mikael.kjellstrom@mksoft.nu2022-08-08T19:45:15+00:00
      On 2022-08-06 18:59, Tom Lane wrote: > This is seemingly an intentional configuration change, because the > animal is reporting different config_env than before. However, > we decide what to set PG_PRINTF_ATTRIBUTE to based on what CC > likes, and if CXX doesn't like it then you'll get these warnings. > (The warnings only appear in C++ compiles, else there'd REALLY > be a lot of them.) Yes, when I upgraded to the lastest DragonFly BSD 6.2.2 I was meaning to switch to CLANG14 for both C and C++. I guess I fat fingered the configuration somehow. I have switch to CLANG14 for both C and C++ now. Let's see if the warnings disappears now. /Mikael
      • Jump to comment-1
        tgl@sss.pgh.pa.us2022-08-08T23:13:53+00:00
        =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= <mikael.kjellstrom@mksoft.nu> writes: > Yes, when I upgraded to the lastest DragonFly BSD 6.2.2 I was meaning to > switch to CLANG14 for both C and C++. I guess I fat fingered the > configuration somehow. > I have switch to CLANG14 for both C and C++ now. > Let's see if the warnings disappears now. Yup, looks clean now. Thanks! regards, tom lane